<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // document.write('来旅梦，去名企');
        // {}用于创建对象 key：value
        // 男主角
        // 未定义？undefined 值未定义，在内存中的分配没有确定
        let num;
        console.log(num);
        num = 1;
        let a = null;
        let ljj = {
            hobbies:["羽毛球","干饭"],
            name:'李家君',
            sex:'男',
            hometown:'丰城',
            college:'东华理工大学',
            room:'938',
            isSingle: true,
            age: 18,
            yz:70,
            sendFlower(target){
                target.receiveFlower(this)
            }
        }
        // 送花
        // 女主角
        let xh = {
            name:'小红',
            xq: 50,
            receiveFlower(sender){
            //     if (sender.yz<90){
            //         console.log('不好意思，你是个好人');
            //     }
            //     else {
            //         console.log('万达走一波')
            //     }
            if (this.xq<80){
                    console.log('gun~~~')
                }else {
                    console.log('万达走一波')
                }
                console.log(this.name+'收到了'+ sender.name+'送的花');
            }
        }
        let xm = {
            name:'小美',
            hometown:'丰城',
            receiveFlower(sender){
            //     if(sender.name == '李家君'){
            //         console.log('君哥，让我们在一起吧……')
            //     }else{
            //         console.log('')
            //     }
            //     xh.receiveFlower(sender)
            // }
            setTimeout(()=>{
                xh.xq = 90;
                xh.receiveFlower(sender)

            },3000)
                
                
            }
        }
    </script>
</body>
</html>